package sudoku;

import java.util.LinkedList;

import jeu.Game;
import jeu.Move;

public class SudokuMove extends Move {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	boolean init;
	
	//si init = false
	int i, j, n; //placer n dans la case i,j
	boolean isGuess;
	
	//si init = true
	LinkedList<SudokuMove> miseEnPlace;
	
	SudokuMove(){
		init = true;
		isGuess = true; //vraie initialisation
		miseEnPlace = new LinkedList<SudokuMove>();
	}
	
	SudokuMove(int i, int j, int n){
		init = false;
		this.i = i;
		this.j = j;
		this.n = n;
		isGuess = true;
	}
	
	SudokuMove(int i, int j, int n, boolean guess){
		init = false;
		this.i = i;
		this.j = j;
		this.n = n;
		isGuess = guess;
	}
	
	SudokuMove(int i, int j, int n, boolean guess, boolean init){
		this.i = i;
		this.j = j;
		this.n = n;
		isGuess = guess;
		this.init = init;
	}

	public boolean isInit() {
		return init;
	}

	public Game getInitialGame() {
		// TODO Auto-generated method stub
		return null;
	}

	public String instruction() {
		if(init && isGuess){
			return ("Mettre le sudoku en place");
		} else if (init && !isGuess){
			return "";
		}
		return "Placer un "+n+" dans la case ("+i+","+j+")";
	}
	
	@Override
	public String toString(){
		return "Move:"+i+","+j+","+n;
	}

}
